package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author testjava
 * @since 2022-08-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Department implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "depid", type = IdType.AUTO)
    private Integer depid;
    private String name;
    private String description;
    @TableField("parentId")
    private Integer parentId;

    @TableField(exist = false)
    private Department parent;
    @TableField(exist = false)
    private List<Department> childrenList;
    @TableField(exist = false)
    private List<User> userList;
}
